-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[C&P] Fix Unbonding slashed suppliers #891
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you SO MUCH! ❤️
Once this is merged, I'll try to do more load testing shortly to see if we can break the network again.
I'll wait for more input from @Olshansk or @bryanchriswhite — I'm not comfortable signing for such changes yet. 😅
@@ -273,8 +273,10 @@ func (st *sessionTree) Delete() error { | |||
// This was intentionally removed to lower the IO load. | |||
// When the database is closed, it is deleted it from disk right away. | |||
|
|||
if err := st.treeStore.Stop(); err != nil { | |||
return err | |||
if st.treeStore != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an error log if treeStore == nil
?
I think it would be helpful if this condition is reached for whatever reason in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preemptively approving. A couple of comments but otherwise, nice solve! 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple comments but no blockers. LGTM!
@@ -273,8 +273,10 @@ func (st *sessionTree) Delete() error { | |||
// This was intentionally removed to lower the IO load. | |||
// When the database is closed, it is deleted it from disk right away. | |||
|
|||
if err := st.treeStore.Stop(); err != nil { | |||
return err | |||
if st.treeStore != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
The CI will now also run the e2e tests on devnet, which increases the time it takes to complete all CI checks. You may need to run GCP workloads (requires changing the namespace to 891) |
## Summary This PR fixes a few bugs that were dependent to each other: 1. Gracefully unbond suppliers that have 0upokt due to off-stake slashing. 2. Fix access to an expired session tree on the realy miner 3. Fix proof block hash seed used on chain. @okdas , One case I didn't manage to reproduce is having the application module account go to `0`. Please tell me if you encounter it again. ## Issue - #841 ## Type of change Select one or more from the following: - [ ] New feature, functionality or library - [ ] Consensus breaking; add the `consensus-breaking` label if so. See #791 for details - [x] Bug fix - [ ] Code health or cleanup - [ ] Documentation - [ ] Other (specify) ## Testing - [ ] **Documentation**: `make docusaurus_start`; only needed if you make doc changes - [x] **Unit Tests**: `make go_develop_and_test` - [x] **LocalNet E2E Tests**: `make test_e2e` - [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR. ## Sanity Checklist - [x] I have tested my changes using the available tooling - [x] I have commented my code - [x] I have performed a self-review of my own code; both comments & source code
Summary
This PR fixes a few bugs that were dependent to each other:
@okdas , One case I didn't manage to reproduce is having the application module account go to
0
. Please tell me if you encounter it again.Issue
Type of change
Select one or more from the following:
consensus-breaking
label if so. See [Infra] Automatically add theconsensus-breaking
label #791 for detailsTesting
make docusaurus_start
; only needed if you make doc changesmake go_develop_and_test
make test_e2e
devnet-test-e2e
label to the PR.Sanity Checklist